package com.chaoma.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chaoma.system.mapper.CmAppVersionMapper;
import com.chaoma.system.domain.CmAppVersion;
import com.chaoma.system.service.ICmAppVersionService;

/**
 * APP版本管理Service业务层处理
 *
 * @author chaoma
 * @date 2023-10-07
 */
@Service
public class CmAppVersionServiceImpl implements ICmAppVersionService
{
    @Autowired
    private CmAppVersionMapper cmAppVersionMapper;

    /**
     * 查询APP版本管理
     *
     * @param id APP版本管理主键
     * @return APP版本管理
     */
    @Override
    public CmAppVersion selectCmAppVersionById(Long id)
    {
        return cmAppVersionMapper.selectCmAppVersionById(id);
    }

    /**
     * 查询APP版本管理列表
     *
     * @param cmAppVersion APP版本管理
     * @return APP版本管理
     */
    @Override
    public List<CmAppVersion> selectCmAppVersionList(CmAppVersion cmAppVersion)
    {
        return cmAppVersionMapper.selectCmAppVersionList(cmAppVersion);
    }

    /**
     * 新增APP版本管理
     *
     * @param cmAppVersion APP版本管理
     * @return 结果
     */
    @Override
    public int insertCmAppVersion(CmAppVersion cmAppVersion)
    {
        return cmAppVersionMapper.insertCmAppVersion(cmAppVersion);
    }

    /**
     * 修改APP版本管理
     *
     * @param cmAppVersion APP版本管理
     * @return 结果
     */
    @Override
    public int updateCmAppVersion(CmAppVersion cmAppVersion)
    {
        return cmAppVersionMapper.updateCmAppVersion(cmAppVersion);
    }

    /**
     * 批量删除APP版本管理
     *
     * @param ids 需要删除的APP版本管理主键
     * @return 结果
     */
    @Override
    public int deleteCmAppVersionByIds(Long[] ids)
    {
        return cmAppVersionMapper.deleteCmAppVersionByIds(ids);
    }

    /**
     * 删除APP版本管理信息
     *
     * @param id APP版本管理主键
     * @return 结果
     */
    @Override
    public int deleteCmAppVersionById(Long id)
    {
        return cmAppVersionMapper.deleteCmAppVersionById(id);
    }

    @Override
    public CmAppVersion selectLatestVersion() {
        return cmAppVersionMapper.selectLatestVersion();
    }
}
